package com.million.demo;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

/**
 * @Author: studyboy
 * @Date: 2022/3/23  17:06
 */
public class ExcelListener extends AnalysisEventListener<DemoData> {

    //改方法一行一行读取Excel内容
    @Override
    public void invoke (DemoData demoData, AnalysisContext analysisContext) {
        System.out.println("****"+demoData);
    }

    //读取表头信息
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头"+headMap);
    }

    //读取完成之后
    @Override
    public void doAfterAllAnalysed (AnalysisContext analysisContext) {

    }
}
